package com.cloudream.core.service;

import com.cloudream.core.entity.InfoEntity;
import com.cloudream.core.interceptor.InfoRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InfoService {

    @Autowired
    InfoRepository infoRepository;

    public Long add(InfoEntity entity){
        return infoRepository.save(entity);
    }

    public void edit(InfoEntity entity){
        infoRepository.update(entity);
    }

    public List getAll(){
        return infoRepository.findAll(InfoEntity.class);
    }
}
